#include <bits/stdc++.h>
#include <iostream>
#include <vector>
#include <string>
using namespace std;

//1.爱框框（滑动窗口）
int main()
{
    int n = 0;
    int x = 0;
    cin >> n >> x;
    vector<int> v(n+1);
    for(int i = 1;i <= n;++i){
        cin >> v[i];
    }
    int front = 1,back = 1;
    int retLeft = 0,retRight = 0;
    int length = INT_MAX;
    int sum = 0;
    while(back < v.size()){
        sum += v[back];
        while(sum >= x)
        {
            if(back-front+1 < length){
                retLeft = front;
                retRight = back;
                length = back-front+1;
            }
            sum -= v[front++];
        }
        ++back;
    }
    cout << retLeft << " " << retRight;
    return 0;
}